package com.shop.dao;

import com.shop.entity.Activity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ActivityDao {

    // 获取所有活动
    List<Activity> getAllActivities();

    // 根据ID获取活动
    Activity getActivityById(int id);

    // 根据活动名称获取活动
    List<Activity> getActivitiesByName(String name);

    // 添加活动
    void insertActivity(Activity activity);

    // 更新活动
    void updateActivity(Activity activity);

    // 删除活动
    void deleteActivity(int id);
}
